cc.Class({
    extends: cc.Component,

    properties: {
        scoreShow:cc.Label,
        scoreHide:cc.Label
    },

   
    onLoad: function () {
       

    },
    init:function(showNum){
        //将看得见的数据赋值
        this.canSeeNum = showNum;
        this.scoreShow.string=this.canSeeNum;

        //将看不见的数据初始化为空
        this.cannotSeeNum="";
    },
    //滚动
    onBoardRoll:function(nextchar){
        this.cannotSeeNum=nextchar;
        
        this.scoreHide.string =  this.cannotSeeNum;

        var action1=cc.moveBy(0.1,cc.p(0,-29));
        var action2=cc.moveBy(0.1,cc.p(0,-29));
        var callBack=cc.callFunc(function(){
            //将两个标签交换
            var temp = this.scoreShow;
            this.scoreShow=this.scoreHide;
            this.scoreHide=temp;


            this.scoreHide.node.y=29;

            //将两个数据也交换
            var tempNum = this.canSeeNum;
            this.canSeeNum =this.cannotSeeNum;
            this.cannotSeeNum = tempNum;
        }.bind(this))

        this.scoreShow.node.runAction(action1);
        this.scoreHide.node.runAction(cc.sequence(action2,callBack));
    }

   
    // update: function (dt) {

    // },
});
